package com.shop.rabbit.rabbitmq.consumer;

import cn.common.constant.RabbitConstants;
import com.shop.rabbit.business.RegisterBusiness;
import com.shop.rabbit.business.WallerBusiness;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@RabbitListener(queues = {RabbitConstants.QUEUE_WALLER})
public class WallerConsumer {
    @Autowired
    private WallerBusiness wallerBusiness;
    @RabbitHandler
    public void listener(String message) {
        wallerBusiness.execute(message);
    }
}
